﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace WXWorkSvc.Common.Migrations
{
    /// <inheritdoc />
    public partial class t5 : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "Loggers",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false)
                        .Annotation("SqlServer:Identity", "9223372036854775807, -1"),
                    AppId = table.Column<int>(type: "int", nullable: false),
                    Dt = table.Column<DateTime>(type: "datetime2", nullable: false),
                    Name = table.Column<string>(type: "nvarchar(450)", nullable: false),
                    LogLevel = table.Column<int>(type: "int", nullable: false),
                    Msg = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Exception = table.Column<string>(type: "nvarchar(max)", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Loggers", x => x.Id);
                });

            migrationBuilder.CreateIndex(
                name: "IX_Loggers_AppId_Name_LogLevel",
                table: "Loggers",
                columns: new[] { "AppId", "Name", "LogLevel" });
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "Loggers");
        }
    }
}
